package com.linkage.repository.order;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.linkage.pojo.order.Order;

/**
 * .
 * 
 * @author: 王权
 */

@Repository
public interface OrderRepository {
	
	public void add(Order order);//添加订单
	
	public void update(Order order);//更改订单
	
	public void updateState(@Param("state")Integer state,@Param("orderId")Integer orderId);//修改订单状态
	
	public void cancel(@Param("orderId")Integer orderId);//取消订单
	
	public Order loadOne(@Param("orderId")Integer orderId);//查询一条订单信息
		
	public List<Order> loadAll(@Param("userId")Integer userId);//查询该用户所有订单信息
	
	public List<Order> loadByState(@Param("userId")Integer userId,@Param("state")Integer state);//查询所有状态为state的订单信息
	
	
}
